package com.gitee.wsl.compose.chart.geometry.model


/**
 * The MapElement class is a reusable containter for a geometry
 * with tags.
 * MapElement is created by TileDataSource(s) and passed to
 * MapTileLoader via ITileDataSink.process().
 * This is just a buffer that belongs to TileDataSource,
 * so dont keep a reference to it when passed as parameter.
 */
class MapElement : GeometryBuffer {
    /** layer of the element (0-10) overrides the theme drawing order  */
    var layer = 0
    val tags: TagSet = TagSet()

    constructor() : super(1024, 16)

    constructor(points: Int, indices: Int) : super(points, indices)


    override fun clear() {
        layer = 5
        super.clear()
    }

    override fun toString(): String {
        return (tags.toString() + '\n').toString() + super.toString() + '\n'
    }
}

